<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부	
	estCd			= Request("estCd")
	prdNm			= Request("prdNm")
	unit				= Request("unit")
	unitPrice		= Request("unitPrice")
	amount			= Request("amount")
	articlePrice		= Request("articlePrice")
	articleTax		= Request("articleTax")
	flag				= Request("flag")
	seq				= Request("seq")

	If unitPrice = "" Then unitPrice = "0" End If 
	If amount = "" Then amount = "0" End If 
	If articlePrice = "" Then articlePrice = "0" End If 
	If articleTax = "" Then articleTax = "0" End If 
	If seq = "" Then seq = "0" End If 

	prdNm				= Replace(prdNm,"'","''")
	unit					= Replace(unit,"'","''")
	unitPrice			= Replace(unitPrice,",","")
	amount				= Replace(amount,",","")
	articlePrice			= Replace(articlePrice,",","")
	articleTax			= Replace(articleTax,",","")
	
	issueId = Request.Cookies("S_uid")
		
	SQLTitle = "-- ■■■■ 견적서 품목 정보 관리 저장 ■■■■"
	SQL = "exec spEstimateArticle '" & estCd & "', '" & prdNm & "', '" & unit & "', " & amount & ", " & unitPrice & ", " & articlePrice & ", " & articleTax & ", '" & flag & "', '" & issueId & "', " & seq
	
	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

'Response.write SQL
'Response.end
	DbCon.Execute SQL

	Call rsWithXML2("Save OK!",estCd)
%>